﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Redeem.aspx.cs" Inherits="Touch2Like.Web.Customer.Manage.Redeem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="/css/user.css" rel="stylesheet" type="text/css" />
    <link href="/css/user_content.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .clearfix {
          *zoom: 1;
        }
        .clearfix:before,
        .clearfix:after {
          display: table;
          content: "";
          line-height: 0;
        }
        .clearfix:after {
          clear: both;
        }
        .hide-text {
          font: 0/0 a;
          color: transparent;
          text-shadow: none;
          background-color: transparent;
          border: 0;
        }
        .input-block-level {
          display: block;
          width: 100%;
          min-height: 30px;
          -webkit-box-sizing: border-box;
          -moz-box-sizing: border-box;
          box-sizing: border-box;
        }
        .label,
        .badge {
          display: inline-block;
          padding: 2px 4px;
          font-size: 11.844px;
          font-weight: bold;
          line-height: 14px;
          color: #ffffff;
          vertical-align: baseline;
          white-space: nowrap;
          text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
          background-color: #999999;
        }
        .label {
          -webkit-border-radius: 3px;
          -moz-border-radius: 3px;
          border-radius: 3px;
        }
        .badge {
          padding-left: 9px;
          padding-right: 9px;
          -webkit-border-radius: 9px;
          -moz-border-radius: 9px;
          border-radius: 9px;
        }
        .label:empty,
        .badge:empty {
          display: none;
        }
        a.label:hover,
        a.label:focus,
        a.badge:hover,
        a.badge:focus {
          color: #ffffff;
          text-decoration: none;
          cursor: pointer;
        }
        .label-important,
        .badge-important {
          background-color: #b94a48;
        }
        .label-important[href],
        .badge-important[href] {
          background-color: #953b39;
        }
        .label-warning,
        .badge-warning {
          background-color: #f89406;
        }
        .label-warning[href],
        .badge-warning[href] {
          background-color: #c67605;
        }
        .label-success,
        .badge-success {
          background-color: #468847;
        }
        .label-success[href],
        .badge-success[href] {
          background-color: #356635;
        }
        .label-info,
        .badge-info {
          background-color: #3a87ad;
        }
        .label-info[href],
        .badge-info[href] {
          background-color: #2d6987;
        }
        .label-inverse,
        .badge-inverse {
          background-color: #333333;
        }
        .label-inverse[href],
        .badge-inverse[href] {
          background-color: #1a1a1a;
        }
        .btn .label,
        .btn .badge {
          position: relative;
          top: -1px;
        }
        .btn-mini .label,
        .btn-mini .badge {
          top: 0;
        }
        .alert {
          padding: 8px 35px 8px 14px;
          margin-bottom: 20px;
          text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
          background-color: #fcf8e3;
          border: 1px solid #fbeed5;
          -webkit-border-radius: 4px;
          -moz-border-radius: 4px;
          border-radius: 4px;
        }
        .alert,
        .alert h4 {
          color: #c09853;
        }
        .alert h4 {
          margin: 0;
        }
        .alert .close {
          position: relative;
          top: -2px;
          right: -21px;
          line-height: 20px;
        }
        .alert-success {
          background-color: #dff0d8;
          border-color: #d6e9c6;
          color: #468847;
        }
        .alert-success h4 {
          color: #468847;
        }
        .alert-danger,
        .alert-error {
          background-color: #f2dede;
          border-color: #eed3d7;
          color: #b94a48;
        }
        .alert-danger h4,
        .alert-error h4 {
          color: #b94a48;
        }
        .alert-info {
          background-color: #d9edf7;
          border-color: #bce8f1;
          color: #3a87ad;
        }
        .alert-info h4 {
          color: #3a87ad;
        }
        .alert-block {
          padding-top: 14px;
          padding-bottom: 14px;
        }
        .alert-block > p,
        .alert-block > ul {
          margin-bottom: 0;
        }
        .alert-block p + p {
          margin-top: 5px;
        }
        th
        {
            text-align: center;
        }
        td
        {
            padding: 3px;
        }
    </style>
    <script src="/js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        parent.ResetContentHeight("500");
        $(document).ready(function () {
            setTimeout(function () { parent.ResetContentHeight($("body").height()); }, 500);
        });

        function ClickFormButton(btnid) {
            $("#" + btnid).click();
        }
    </script>
</head>
<body style="background: white; overflow: hidden;">
    <form id="form1" runat="server">
    <div class="detail-container">
        <div class="header">
            <h3>
                Redeem
            </h3>
        </div>
        <div class="content">
            <div class="section-wrap">
                <h3>
                    Verify Coupon Code
                </h3>
                <div class="container">
                    <div class="form-field-view">
                        <asp:Literal ID="lb_Msg" runat="server"></asp:Literal>
                        <asp:TextBox ID="tb_CouponCode" runat="server" CssClass="field"></asp:TextBox>
                        <button class="button medium blue" onclick="ClickFormButton('btn_Apply')">
                            <span>Apply</span></button>
                        <asp:Button ID="btn_Apply" runat="server" CssClass="button medium blue" OnClick="btn_Apply_Click"
                            Text="Apply" Style="display: none" />
                    </div>
                </div>
            </div>
            <div class="section-wrap">
                <h3>
                    List
                </h3>
                <div class="container">
                    <asp:GridView ID="GridView_Redeem" runat="server" AutoGenerateColumns="false" AllowPaging="true"
                        PageSize="20" AllowSorting="true" OnPageIndexChanging="GridView_Redeem_PageIndexChanging"
                        OnSorting="GridView_Redeem_Sorting" Width="640px" RowStyle-BorderStyle="Solid"
                        RowStyle-BorderWidth="1px" RowStyle-BorderColor="#e4e6eb" BorderWidth="1px" HeaderStyle-BorderWidth="1px"
                        HeaderStyle-BorderColor="#e4e6eb" HeaderStyle-BorderStyle="Solid" CellSpacing="2"
                        CellPadding="3" HeaderStyle-BackColor="#EEF0F4" HeaderStyle-Height="30px" HeaderStyle-HorizontalAlign="Center">
                        <Columns>
                            <asp:TemplateField HeaderText="Email" SortExpression="Email">
                                <ItemTemplate>
                                    <span style="color: #0068de; font-weight: bold;">
                                        <%#Eval("Email") %></span>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Coupon Value" SortExpression="CouponValue">
                                <ItemTemplate>
                                    <%#Eval("CouponValue")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Status" SortExpression="IsRedeemed">
                                <ItemTemplate>
                                    <%#GetStatus(Eval("IsRedeemed"))%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Redeem Date" SortExpression="RedeemDate">
                                <ItemTemplate>
                                    <%#FormatDate(Eval("RedeemDate"))%></ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
